Method and apparatus for protecting lossless transmission of a data stream

ABSTRACT

A method and apparatus ( 10 ) for encoding an input digital signal for lossless transmission comprising first calculation means ( 12 ) for calculating a checksum of the input digital signal. The apparatus further comprises encoding means ( 11 ) for lossless encoding into an encoded packet of digital data, and composition means ( 13 ) for adding the associated checksum to the encoded packet to form an encoded signal. Associated are a method and apparatus ( 20 ) for decoding the encoded signal, comprising extracting means ( 21 ) for receiving the encoded signal and extracting the encoded packet and associated checksum, decoding means ( 22 ) for decoding the encoded packet into a decoded packet comprising the input digital signal, second calculation means ( 23 ) for calculating a checksum for the decoded packet, and output means ( 24, 25 ) for outputting the decoded packet as an output signal if the calculated checksum corresponds with the extracted checksum.

[0001] The present invention relates to a method and apparatus forprotecting lossless transmission of a data stream. More specifically,the present invention relates to a method of encoding an input digitalsignal for lossless transmission via a medium, the method comprising thesteps of receiving the input digital signal comprising at least onepacket of digital data, and calculating a checksum of the at least onepacket of the input digital signal.

[0002] Such a method is known from United States patent U.S. Pat. No.5,341,384, which describes an error detection method using CRC indigital communication of a speech signal. From an input digital signal,a checksum (CRC) is calculated and added to the signal. Then, thecomposed signal is encoded to enable error correction for transmissionover a communication medium. After reception of the signal, the signalis decoded and checked on errors and checked on the checksum. When anerror is detected, or when the checksum control fails, the signal isinterpolated or muted, so that an error is not decoded into speech.

[0003] This known method has the disadvantage that the reception andfurther processing requires the error detection and checksum monitoringto be present at all times. This is caused by the fact that in the knownmethod first a checksum is calculated and added to the signal and that,subsequently, an error correction code is calculated over the completecomposed signal. Earlier equipment not provided with the error detectionand checksum monitoring are unable to properly transform the receivedsignal into the original signal.

[0004] Therefore, the present invention seeks to provide a method andapparatus for protecting a lossless transmission of a data stream byencoding and decoding a digital data signal, able to provide an outputdigital signal which is equal to the input digital signal, which alsoallows backwards compatibility with former systems not using theprotection scheme.

[0005] The present invention provides, in a first aspect, a method ofthe type defined in the preamble, comprising the further steps ofencoding the packet of the input signal into an encoded packet ofdigital data, and adding the associated checksum to the encoded packetto form an encoded signal. Preferably, the associated checksum is acyclic redundancy checksum (CRC) and is preferably added to the encodedpacket as a separate packet.

[0006] The method according to the present invention, providesprotection over the complete path from input digital signal to outputdigital signal for all data comprised in data packets of the datastream. The present method assures that the output signal of the decoderis equal to the input signal of the encoder, regardless whether thedecoder is equipped with the checksum monitoring or not. Therefore, thepresent method is backwards compatible with audio equipment not usingthe checksum monitoring.

[0007] Furthermore, the present invention provides a method of decodingan encoded signal obtained by the encoding method according to thepresent invention, comprising the steps of receiving the encoded signal,extracting the encoded packet and associated checksum from the receivedencoded signal, decoding the encoded packet into a decoded packetcomprising the input digital signal, calculating a checksum for thedecoded packet and, if the calculated checksum corresponds with theextracted checksum, outputting the decoded packet as an output signal.This decoding method provides the end-to-end protection in the losslesstransmission of the data stream. The end-to-end protection is able totest the implementation of the decoder (hardware or softwareimplementation). When the implementation is incorrect, no output signalwill result.

[0008] In a further embodiment of the present method, the methodcomprises the further step of channel encoding, to enable a losslesstransmission via the medium. Also, the decoding method then comprisesthe further step of channel decoding before the step of receiving theencoded signal, to enable a lossless transmission via the medium. It ispossible that the channel encoding/decoding step performs a faulty errorcorrection, which would lead to a faulty data packet, with the sameconsequences as stated above. The present method will detect such afaulty channel decoding.

[0009] Preferably, the method comprises the further step ofinterpolating or muting the decoded packet if the calculated checksumand the extracted checksum are unequal. Errors in the decoding step mayresult in faulty data packets, which in audio applications may lead todamage to output processing systems (output gates or loudspeakers), ormay even cause nuisance or hearing damage to listeners. The presentinvention allows to detect and subsequently interpolate or mute faultypackets, and thus provides a more robust method for data stream encodingand decoding.

[0010] In a further aspect, the present invention provides an apparatusfor encoding an input digital signal comprising at least one packet ofdigital data for lossless transmission via a medium, the apparatuscomprising first calculation means for calculating a checksum of the atleast one packet of the input digital signal, such as known from U.S.Pat. No. 5,341,384. According to the present invention, the apparatusfurther comprises encoding means for lossless encoding of the at leastone packet into an encoded packet of digital data, and composition meansconnected to the calculation means and encoding means for adding theassociated checksum to the encoded packet to form an encoded signal.Preferably, the checksum is a cyclic redundancy checksum and,preferably, the associated checksum is added to the encoded packet as aseparate packet.

[0011] Associated with the encoding apparatus is a decoding apparatusfor decoding an encoded signal obtained from the encoding apparatusaccording to the present invention, comprising extracting means forreceiving the encoded signal and extracting the encoded packet andassociated checksum from the received encoded signal, decoding meansconnected to the extracting means for decoding the encoded packet into adecoded packet comprising the input digital signal, second calculationmeans connected to the decoding means for calculating a checksum for thedecoded packet, and output means connected to the extracting means, thesecond calculation means and the decoding means for outputting thedecoded packet as an output signal if the calculated checksumcorresponds with the extracted checksum.

[0012] Preferably, the output means are further arranged forinterpolating or muting the decoded packet if the calculated checksumand the extracted checksum are unequal.

[0013] In a further embodiment, the encoding apparatus further compriseschannel encoding means connected to the composition means and beingarranged to enable a lossless transmission via the medium, and thedecoding apparatus further comprises channel decoding means connected tothe extracting means, the channel decoding means being arranged toenable a lossless transmission via the medium.

[0014] The encoding and decoding apparatus provide comparable advantagesto the method according to the present invention above.

[0015] In still further aspects, the present invention relates to asignal comprising at least a packet of a first type and a packet of asecond type, obtained by the encoding method according to the presentinvention and to a storage medium comprising a signal according to thepresent invention.

[0016] The present invention will now be discussed in more detail usinga number of exemplary embodiments of the present invention, withreference to the accompanying drawings, in which:

[0017]FIG. 1 shows a schematic diagram for an encoding and decodingapparatus according to an embodiment of the present invention; and

[0018]FIG. 2 shows a schematic diagram of a lossless transmission mediumused in the present invention.

[0019] The present invention will be discussed in more detail bydescribing the coding and decoding process of a digital audio signal fora Super Audio Compact Disc (SACD).

[0020] A sound signal is converted into a digital signal using theDirect Stream Digital (DSD) standard used in e.g. super audio compactdisc technology. The DSD signal is a one-bit audio signal, and maycomprise a number of multiplexed audio channels, each audio channelbeing intended for one loudspeaker. At present, the number of audiosignals may range from two (normal stereo) to six (ITU-R BS.7755-channel surround set-up plus additional low frequency enhancementloudspeaker).

[0021] The digital signal comprises a number of sectors, which maycomprise an audio header and a number of (multiplexed) data packets,where the audio header comprises information on the data packets in thesector and on frames that start in the sector. Each data packet maycomprise audio data, supplementary data, audio information data orpadding data. An integer number of packets form a multiplexed frame,having a time length of 1/75th of a second, and a time code expressed inminutes, seconds and frames.

[0022] According to the super audio CD (SACD) standard being developed,a lossless coding technique is being used to encode the DSD signalbefore storage (e.g. on a SACD), called Direct Stream Transfer (DST).This lossless coding technique is described in F. Bruekers et al.,“Improved lossless coding of 1-bit audio signals”, presented at the103rd Convention of the AES, Sep. 26-29, 1997, preprint 4563 (I-6). Thislossless coding technique allows inter alia to improve the dynamic rangeof the digital signal and compression of data allowing more data to bestored on the medium.

[0023]FIG. 1 shows a schematic diagram of an embodiment of the presentinvention, comprising an encoder device 10 and a decoder device 20. Inthe schematic diagram, only the elements relevant to this invention areshown and discussed herein, the other elements found in actual systems(such as SACD recorders and players) are left out for reasons ofclarity.

[0024] A DSD signal is being input to the encoder device 10 for encodingand transmission via a transport medium 15, such as a transmission lineor recording medium, such as a SACD or DVD disc. The decoder device 20receives the encoded signal from the transport medium 15, decodes theencoded signal and outputs a decoded signal to an output device 30,which is arranged to further process this output signal to produce anaudio signal in a manner known to the person skilled in the art.

[0025] When the recovered output signal is corrupted, i.e. compriseserrors in comparison with the input signal of the encoder device 10, theresult may be that the output device 30, or parts thereof such as outputstages or loudspeakers, may be damaged. Also, the corrupted outputsignal may, when transformed into an audio signal, be hazardous to thehuman hearing.

[0026] The encoder device 10 comprises a DST encoder device 11, whichreceives the input DSD signal and performs the DST encoding function foreach DSD signal audio packet. Also the encoder device 10 comprises achecksum calculating element 12, which also receives the input DSDsignal. Synchronous with the DST encoding, the checksum calculatingelement 12 calculates a checksum (such as a cyclic redundancy checksum,CRC) from the DSD signal audio packet. The output signals of the DSTencoder element 11 and checksum calculating element 12 are combined inthe combination element 13.

[0027] In an embodiment, the checksum calculating element 12 preferablycalculates the checksum (CRC(x)) of the DSD signal audio packetaccording to the following equations:${{{CRC}(x)} = {{\sum\limits_{i = 31}^{0}{b_{i}x^{i}}} = {{I(x)}\quad {mod}\quad {G(x)}}}},{where}$${{I(x)} = {\sum\limits_{i = {{8*4704*N\quad \_ \quad {Channels}} + 32 - 1}}^{32}{b_{i}x^{i}}}},{{{and}\quad {G(x)}} = {x^{32} + x^{31} + x^{4} + 1}}$

[0028] The combination element 13 adds the checksum as a separate packetin the digital data stream. Preferably, the checksum is included in anaudio info packet, which is included in the encoded audio packet in thesame multiplexed frame. Including the checksum in an additional audioinfo packet has the advantage that the signal is backwards compatiblewith decoding equipment not arranged to extract the checksuminformation.

[0029] The decoder device 20 comprises extracting element 21 forrecovering the encoded signal from the medium 15 and for extracting theaudio packets and associated audio info packets from the multiplexedframes in the encoded signal. The extracted audio packets are input intoa DST decoder 22, which decodes the DST encoded information into theoriginal DSD format digital input signal. The decoded signal packet isthen input to a checksum calculating device 23 for the decoded signal,and the resulting checksum is compared to the extracted checksum incomparator 24. The comparator 24 is controlling a switch or gate 25,which allows the decoded audio packet to be output to the output device30 when the extracted checksum and calculated checksum correspond. Whenthe extracted checksum and calculated checksum do not correspond, thegate 25 is prevented from outputting the (faulty) packet, thuspreventing possible damage to the output stage or loudspeaker of theoutput device or equipment 30 which uses the output signal of thedecoder device 20. Preferably, the equipment 30 which uses the outputsignal of the decoder device 20 is arranged to mute or interpolate theoutput signal when a specific packet is blocked. Alternatively, thismuting or interpolation function may be implemented in the switch orgate 25.

[0030] The encoded signal is transmitted via the transport medium 15(transmission line, e.g. Internet, or (super audio) compact discstorage) to the decoder device 20. The medium 15 may be a simpletransmission line or a storage element. In an alternative embodiment,the transport medium 15 is a medium 18, which may introduce errors inthe encoded signal. To allow correction of errors, the transport medium15 comprises a channel coding element 16 and a channel decoding element17 for allowing error detection and correction of errors introduced bythe medium 18. The channel coding element 16, channel decoding element17, and (error introducing) medium 18 thus form an error free transportmedium 15. However, it is still possible that errors which are not(properly) detected and/or corrected by the channel encoding/decodingelements 16, 17 are introduced in the encoded signal by the medium 18.In the embodiment according to the present invention, the use of thechecksum allows to detect whether the output digital signal correspondsexactly to the input digital signal. This also allows to detect correctoperation of the decoder. When the decoder is implemented incorrectly,this will result in an anomalous output signal. Also defects incomponents of the decoder, e.g., resulting from ageing. In that case,the decoder will no longer operate correctly, as a result of which theoutput signal will no longer correspond to the original signal. Theintroduced errors which might lead to damage to the output stage of theoutput equipment 30, such as damaged loudspeakers, or damage to thelistener's ear, are thus prevented.

[0031] In the above discussed illustrative embodiment, the digital inputsignal described is a DSD signal used in SACD or DVD recording andplaying. For the person skilled in the art it will be clear that thepresent invention may be used for all areas of lossless transmission ofdata, independent of what the data represents. Besides the alreadydescribed audio data, the data may comprise pulse code modulation (PCM)data, the transmission of which may be protected by the presentinvention for all data or only a part of them (e.g. the most significantbits).

1. A method of encoding an input digital signal for losslesstransmission via a medium (15), the method comprising the steps of:receiving the input digital signal comprising at least one packet ofdigital data; and calculating a checksum of the at least one packet ofthe input digital signal; characterised in that the method comprises thefurther steps of: encoding the packet of the input signal into anencoded packet of digital data; and adding the associated checksum tothe encoded packet to form an encoded signal.
 2. A method as claimed inclaim 1, in which the associated checksum is added to the encoded packetas a separate packet.
 3. A method as claimed in claim 1 or 2, in whichthe checksum is a cyclic redundancy checksum.
 4. A method as claimed inclaim 1, 2, or 3, in which the method comprises the further step ofchannel encoding, to enable a lossless transmission via the medium (15).5. A method of decoding an encoded signal obtained by the encodingmethod according to one of the claims 1 through 4, comprising the stepsof: receiving the encoded signal; extracting the encoded packet andassociated checksum from the received encoded signal; decoding theencoded packet into a decoded packet comprising the input digitalsignal; calculating a checksum for the decoded packet; and if thecalculated checksum corresponds with the extracted checksum, outputtingthe decoded packet as an output signal.
 6. A method as claimed in claim5, in which the method comprises the further step of interpolating thedecoded packet if the calculated checksum and the extracted checksum areunequal.
 7. A method as claimed in claim 5, in which the methodcomprises the further step of muting the decoded packet if thecalculated checksum and the extracted checksum are unequal.
 8. A methodas claimed in claim 5, 6 or 7, when dependent on claim 4, comprising thefurther step of channel decoding before the step of receiving theencoded signal, to enable a lossless transmission via the medium (15).9. An apparatus (10) for encoding an input digital signal comprising atleast one packet of digital data for lossless transmission via a medium(15), the apparatus (10) comprising: first calculation means (12) forcalculating a checksum of the at least one packet of the input digitalsignal; characterised in that the apparatus further comprises: encodingmeans (11) for lossless encoding of the at least one packet into anencoded packet of digital data; and composition means (13) connected tothe calculation means (12) and encoding means (11) for adding theassociated checksum to the encoded packet to form an encoded signal. 10.An apparatus as claimed in claim 9, in which the composition means (13)are arranged to add the associated checksum to the encoded packet as aseparate packet.
 11. An apparatus as claimed in claim 9 or 10, in whichthe calculation means (12) are arranged for calculating the checksum asa cyclic redundancy checksum.
 12. An apparatus as claimed in claim 9, 10or 11, in which the apparatus further comprises channel encoding means(16) connected to the composition means (13) and being arranged toenable a lossless transmission via the medium (18).
 13. An apparatus(20) for decoding an encoded signal obtained from the encoding apparatusaccording to one of the claims 9 through 12, comprising: extractingmeans (21) for receiving the encoded signal and extracting the encodedpacket and associated checksum from the received encoded signal;decoding means (22) connected to the extracting means (21) for decodingthe encoded packet into a decoded packet comprising the input digitalsignal; second calculation means (23) connected to the decoding means(22) for calculating a checksum for the decoded packet; and output means(24, 25) connected to the extracting means (21), second calculationmeans (23) and decoding means (22) for outputting the decoded packet asan output signal if the calculated checksum corresponds with theextracted checksum.
 14. An apparatus as claimed in claim 13, in whichthe output means (24, 25) are further arranged for interpolating thedecoded packet if the calculated checksum and the extracted checksum areunequal.
 15. An apparatus as claimed in claim 13, in which the outputmeans (24, 25) are further arranged for muting the decoded packet if thecalculated checksum and the extracted checksum are unequal.
 16. Anapparatus as claimed in claim 13, 14 or 15, when dependent on claim 12,further comprising channel decoding means (17) connected to theextracting means (21), the channel decoding means (17) being arranged toenable a lossless transmission via the medium.
 17. A signal comprisingat least a packet of a first type and a packet of a second type,obtained by the method as claimed in one of the claims 1 through
 4. 18.A storage medium comprising a signal as claimed in claim 17.